package com.ddone.ioc.annotation.controller;

import com.ddone.ioc.annotation.bean.Book;
import com.ddone.ioc.annotation.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author ddone
 * @date 2024/3/19-18:46
 */
@Controller
public class BookController {

    @Autowired(required = false)
    private BookService bookService;

    public void addBook(Book book) {
        bookService.addBook(book);
    }
}
